package com.example.mapper;

import com.example.pojo.Clazz;
import com.example.pojo.ClazzQueryParam;
import com.example.pojo.Emp;
import com.example.pojo.PageResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @Auther: Sun
* @Date: 2025/9/22 - 09 - 22 - 10:25
* @Description: com.example.mapper
*/
@Mapper
public interface ClazzMapper {

    List<Clazz> list(ClazzQueryParam clazzQueryParam);

    void deleteById(Integer id);

    void add(Clazz clazz);
    @Select("select * from clazz where id=#{id}")
    Clazz getById(Integer id);

    void updateById(Clazz clazz);
//    @Select("select  c.*,s.name studentName from clazz c left join student s on s.clazz_id = c.id order by c.update_time desc ")
   @Select("select * from clazz order by update_time desc ")
    List<Clazz> listAll();

//    @Select("select e.name masterName from emp e where e.job = 1  ")
//    List<Emp> listAll(Emp emp);
}
